import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
import React from "react";
import Drawer from "../drawer";
import Fade from "@mui/material/Fade";
import classes from "./modal.module.less";
import classNames from "classnames";
import Zoom from "@mui/material/Zoom";
import { jsx as _jsx } from "react/jsx-runtime";
function Modal(props) {
    var open = props.open, contentClassName = props.contentClassName, _props_type = props.type, type = _props_type === void 0 ? "zoom" : _props_type, children = props.children, className = props.className, reset = _object_without_properties(props, [
        "open",
        "contentClassName",
        "type",
        "children",
        "className"
    ]);
    var Transition = type === "zoom" ? Zoom : Fade;
    return /*#__PURE__*/ _jsx(Drawer, _object_spread_props(_object_spread({}, reset), {
        open: open,
        className: classNames(classes.modal_root, className),
        content: /*#__PURE__*/ _jsx(Transition, {
            in: !!open,
            children: /*#__PURE__*/ _jsx("div", {
                children: /*#__PURE__*/ _jsx("div", {
                    className: classNames(classes.modal_content, contentClassName),
                    children: children
                })
            })
        })
    }));
}
export default Modal;

 //# sourceMappingURL=index.js.map